Skip to content

Improve desktop answer popup UX#286

Merged
BigSimmo merged 21 commits into
mainfrom
cursor/desktop-answer-popups-3035
Jul 6, 2026
Merged

Improve desktop answer popup UX#286
BigSimmo merged 21 commits into
mainfrom
cursor/desktop-answer-popups-3035

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Redesigns desktop answer popups: anchored source preview popover (no layout reflow) and refined evidence review modal entrance.

Changes

  • Source capsule preview (desktop ≥1024px): SourcePreviewPopover — portaled, anchor-positioned, Escape/outside dismiss, focus return, chevron rotation
  • Evidence sheet: sm:max-w-3xl, stronger backdrop, dialog-rise animation
  • Clinical notes + safety sheets: matching sm:bg-black/50 backdrop on desktop (follow-up commit)
  • ClinicalDashboard: removed dead #answer-evidence-drawer <details> fallback from openEvidenceDrawer() (follow-up commit)
  • Tests: unified source surface to role="dialog"; desktop Escape + toggle dismiss

Commits

  1. dc3a15430 — core popup UX (popover, sheet animation, mockup, tests)
  2. 5e3735dce — polish clinical/safety sheets + drawer fallback cleanup (2 files only)

Verification

npm install   # if node_modules incomplete
npm run ensure
npx playwright test tests/ui-smoke.spec.ts -g "answer support popups adapt" --project=chromium

Preview

  • Static mockup: /mockups/answer-evidence-popups
  • Live: run a demo answer on desktop (≥1024px), open source capsule and evidence triggers
Open in Web Open in Cursor 

BigSimmo and others added 11 commits July 3, 2026 21:00
The golden retrieval set was 100% lexical fast-path (embedding_skipped_rate=1.0), so
it could not measure whether a re-index changes vector/embedding retrieval quality.

- forceEmbedding option on searchChunksWithTelemetry (SearchChunksArgs): bypasses every
  lexical text-fast-path so retrieval always exercises the embedding/vector stage.
  Diagnostic/eval-only; folded into the search cache key; never set on production paths.
- eval-retrieval.ts: per-case `forceEmbedding` field + a global `--force-embedding` flag.
- 10 `vector-*` cases (psychiatric monographs: PTSD, OCD, panic, anorexia, GAD, Tourette,
  postnatal, bipolar, ADHD, opioid) with forceEmbedding=true. Each is a clinical query that
  must be answered by vector retrieval of the right monograph — verified live at
  document_recall@5=1.0, content_recall@5=1.0, all via strategy=hybrid (embedding used).

Rationale: forcing embedding is the correct instrument for re-index measurement — you want
to measure the vector index directly, not have a lexical shortcut mask a regression. Wording
alone can't reliably force the vector path (the fast-path is driven by emergent lexical-match
strength), so the flag makes these probes deterministic.

Live golden eval: 34/34 pass (24 existing + 10 new), no regression. verify:cheap green (980).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wire forceEmbedding through eval runners and retrieval cache keys, bypass coverage/lexical shortcuts when forced, and add golden-case failure metrics so vector regressions cannot hide behind text-fast-path or cache hits.
…board

Delete post-extraction dead code left in the monolith and trim unused imports. Also fix minor lint issues in favourites-hub, visual-evidence, and services-navigator.
…-5c94

fix: complete public production access hardening for mobile and anonymous users
@supabase

supabase Bot commented Jul 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 5, 2026 17:04
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@BigSimmo

BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Organizing open PRs (Jul 6): Retargeted base from closed #282 to \main. Branch needs rebase onto current main before merge.

@BigSimmo
BigSimmo changed the base branch from cursor/merge-access-to-main-5c94 to main July 5, 2026 17:17
@BigSimmo
BigSimmo force-pushed the cursor/desktop-answer-popups-3035 branch from 5bc1636 to 5e3735d Compare July 5, 2026 17:22
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@BigSimmo
BigSimmo enabled auto-merge July 5, 2026 18:07
Integrate main public API access, rate limiting, auth patterns, and
retrieval owner sentinel while preserving PR #286 desktop answer popup UX.

Includes Supabase drop-before-recreate fix for match_document_chunks_text
in migration 20260705210000.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Mobile follow-ups no longer shown
    • Restored composerFollowUpSuggestions, onPickComposerFollowUpSuggestion, and composerFollowUpSuggestionsDisabled props on MasterSearchHeader so mobile follow-up chips render in the phone footer dock again.
  • ✅ Fixed: Escape does not restore anchor focus
    • Added requestAnimationFrame focus restoration to the source preview popover's capture-phase Escape handler so focus returns to the source capsule after dismiss.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit a017402. Configure here.

Comment thread src/components/ClinicalDashboard.tsx
Comment thread src/components/clinical-dashboard/source-preview-popover.tsx
- Re-wire composerFollowUpSuggestions props to MasterSearchHeader so
  mobile answer follow-up chips render in the phone footer dock again.
- Restore anchor focus after Escape dismisses the desktop source preview
  popover, matching sheet behavior and Playwright expectations.
@BigSimmo

BigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

1 similar comment
@BigSimmo

BigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

…-popups-3035

# Conflicts:
#	src/components/applications-launcher-page.tsx

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Done. Merged origin/main into the branch — there was one content conflict in src/components/applications-launcher-page.tsx (the selection initializer and selectedId logic). Resolved by keeping the branch's more complete version (lazy initializer with controlledQuery ?? "", detailOpen || guard) since the rest of the component depends on the isDashboardTools/variant/showDetailPanel refactor. Merge commit: dd0af81.

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Already resolved in the previous request - merge commit dd0af81 integrated origin/main and resolved the conflict in src/components/applications-launcher-page.tsx. The branch is now clean and up-to-date with main.

@BigSimmo
BigSimmo merged commit 0ee2e6d into main Jul 6, 2026
5 checks passed
@BigSimmo
BigSimmo deleted the cursor/desktop-answer-popups-3035 branch July 8, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants